import React from 'react'

const SvgIcon = ({ icon, marginRight = 20, size = 20, handleClick = () => {} }) => {
  const style = {
    marginRight: `${marginRight}px`,
    color: 'white',
    fill: 'white',
    size,
    cursor: 'pointer',
  }
  return (
    <svg className="iconfont" style={style} aria-hidden="true" onClick={handleClick}>
      <use xlinkHref={icon} />
    </svg>
  )
}

export default SvgIcon
